import 'element-plus/es/components/message/style/css'
import nProgress from 'nprogress'


// 消息提示
export function showMessage(message = '提示内容', type = 'success', customClass = '') {
    return ElMessage({
        type: type,
        message,
        customClass,
    })
}

//配置loading
export function startLoading(){ // 开始loading
    nProgress.start();
}
export function doneLoading(){ // 结束loading
    nProgress.done();
}
//配置弹出框(警告框)
export function showConfirm(message = '提示内容', type = 'warning', title= '') {
    return ElMessageBox.confirm(
        message,
        '提示',
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: type,
        }
    )
}